package com.qupeng.demo.kafka.kafkaspringbootconsumer.mm2.client;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Data
@Component
@ConfigurationProperties(prefix = "app.kafka")
public class MM2ClientProperties {
    @Value("${app.kafka.bootstrap-servers}")
    private String bootstrapServer;
    @Value("${app.kafka.security-protocol:}")
    private String securityProtocol;
    @Value("${app.kafka.ssl-keystore-location:}")
    private String sslKeystoreLocation;
    @Value("${app.kafka.ssl-keystore-password:}")
    private String sslKeystorePassword;
    @Value("${app.kafka.ssl-truststore-location:}")
    private String sslTruststoreLocation;
    @Value("${app.kafka.ssl-truststore-password:}")
    private String sslTruststorePassword;
    @Value("${app.kafka.consumer.group-id}")
    private String groupId;
    @Value("${app.kafka.consumer.key-deserializer-int}")
    private String keyDeserializerInt;
    @Value("${app.kafka.consumer.value-deserializer-str}")
    private String valueDeserializerStr;
    @Value("${app.kafka.consumer.value-deserializer-json:}")
    private String valueDeserializerJson;
    @Value("${app.kafka.consumer.value-deserializer-avro:}")
    private String valueDeserializerAvro;
    @Value("${app.kafka.serialization.format}")
    private String serializationFormat;
    @Value("${app.kafka.serialization.avro.schema-registry-url:}")
    private String schemaRegistryUrl;

    public String getBootstrapServer() {
        return bootstrapServer;
    }

    public String getSecurityProtocol() {
        return securityProtocol;
    }

    public String getSslKeystoreLocation() {
        return sslKeystoreLocation;
    }

    public String getSslKeystorePassword() {
        return sslKeystorePassword;
    }

    public String getSslTruststoreLocation() {
        return sslTruststoreLocation;
    }

    public String getSslTruststorePassword() {
        return sslTruststorePassword;
    }

    public String getGroupId() {
        return groupId;
    }

    public String getKeyDeserializerInt() {
        return keyDeserializerInt;
    }

    public String getValueDeserializerStr() {
        return valueDeserializerStr;
    }

    public String getValueDeserializerJson() {
        return valueDeserializerJson;
    }

    public String getValueDeserializerAvro() {
        return valueDeserializerAvro;
    }

    public String getSerializationFormat() {
        return serializationFormat;
    }

    public String getSchemaRegistryUrl() {
        return schemaRegistryUrl;
    }
}
